home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / tutor / dosguide.exe / HELPDOS.ZIP / REDIRECT.HLP < prev    next >
Text File  |  1985-09-10  |  1KB  |  38 lines

  1. --------------------  REDIRECTION -  A Special DOS Feature  --------------------
  2.  
  3. REDIRECTION allows a program to direct its output to a target other than the
  4.    display screen or to receive its input from a source other than the keyboard.
  5.  
  6. FORMAT:   <[d:][path]filename[.ext]     for input from a file
  7.  
  8.           >[d:][path]filename[.ext]     for output to a file
  9.  
  10.           >PRN                          for output to a printer
  11.  
  12.           >>[d:][path]filename[.ext]    for appended output to a file
  13.  
  14. REMARKS:
  15.  
  16.    If a program obtaining its input from a file via redirection ("<") tries to
  17.    read data after end-of-file, DOS will be unable to supply the data and
  18.    processing will stop.  In this event, use Control-Break to return to DOS.
  19.  
  20.    Redirection will not work if the program involved in redirection does not use
  21.    DOS function calls to perform standard input and output.
  22.  
  23. EXAMPLES:
  24.  
  25. Redirect the output of the DIR command to the printer:
  26.  
  27.       DIR > PRN
  28.  
  29.  
  30. Sort a directory display and write it to the file DIRFILE:
  31.  
  32.       DIR | SORT > DIRFILE
  33.  
  34.  
  35. Append the output of the TREE command to the file TREEHIST:
  36.  
  37.       TREE >> TREEHIST
  38.